The present invention relates to random number generation. More specifically, the present document relates to a method and an entity for generating random numbers based on threshold switching mechanism.